#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
@Author   : long.hai
@Contact  : 1982964634@qq.com
"""
import re


class SuccessMessage:
    CONN_BROWSER = "连接Chrome浏览器成功，设置浏览器超时时间为5000ms"
    GOTO_START = ["即将跳转到目标网址： %s", "url"]
    GOTO_END = "跳转成功"

    @staticmethod
    async def get_str_selector(selector):
        str_el = str(selector)
        match = re.search(r'selector=(.*?)>', str_el)
        # 检查是否匹配成功
        if match:
            # 提取匹配结果
            str_el = match.group(1)
        return str_el
